home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Online / AmiTradeCenter / Utilities / AmFTP2ATC.rexx next >
OS/2 REXX Batch file  |  2000-05-27  |  2KB  |  98 lines

  1. /*
  2. $VER: AmFTP2ATC Profilesconverter 1.3 (25.03.00)
  3.  
  4. ** AmFTP-Profiles 2 ATC-Profiles
  5. **
  6. ** 06.08.1999 (gelb) - Check auf anonymous eingebaut
  7. **
  8. ** 20.02.2000 (ingo) - An neues .profiles format angepaßt
  9. **
  10. ** 25.03.2000 (ingo) - VERSION 3 und ACTIVESERVER 0 eingefügt
  11. **
  12. */
  13.  
  14.  
  15. OPTIONS RESULTS
  16.  
  17.  tab=d2c(9)
  18.  
  19.  IF show('P','AMFTP.1') THEN
  20.   DO
  21.     ADDRESS 'AMFTP.1'
  22.     GETHOSTS host
  23.   END
  24.  ELSE DO
  25.   Say "AmFTP.1 not found!"
  26.   Exit 10
  27.  END
  28.  
  29.  DO I=1 TO 500
  30.   IF POS('HOST.',host.i)~=0 THEN LEAVE
  31.  END
  32.  
  33.  IF ~Open(NEW,'ram:ATC.Profiles',W) THEN
  34.   DO
  35.    Say 'Failed to open file!'
  36.    Exit 10
  37.   END
  38.  
  39.  WriteLn(NEW,'VERSION 3')
  40.  WriteLn(NEW,'ACTIVESERVER 0')
  41.  
  42.  DO X=0 TO I-1
  43.   GETPROFILE X OLD
  44.  
  45.   IF OLD.ANON=1 THEN /* 06.08.1999 */
  46.     MODE=1
  47.   ELSE IF OLD.ADT=1 THEN
  48.     MODE=2
  49.   ELSE
  50.     MODE=0
  51.  
  52.   WriteLn(NEW,'SERVER '||OLD.HOST||tab||OLD.USERNAME||tab||OLD.PASSWORD||tab||OLD.PORT||tab||OLD.LABEL||tab||MODE||tab||3||tab||200||tab||OLD.LOCALDIR||tab||1||tab||OLD.DEFDIR||tab||1||tab||tab||0||tab||0||tab||0||tab||0||tab||0||tab||1||tab||0||tab||0)
  53.  END
  54.  
  55. Close(NEW)
  56.  
  57. /*
  58. 0 host
  59. 1 login
  60. 2 password
  61. 3 port
  62. 4 comment
  63. 5 mode         0=l/p 1=anon 2=adt
  64. 6 tries
  65. 7 cpslimit     set to 200 (full speed)
  66. 8 localdir
  67. 9 savelocal    0=off 1=on
  68. 10 remotedir
  69. 11 saveremote  0=off 1=on
  70. 12 firstlogin  seconds since 01.01.1978
  71. 13 lastlogin   seconds since 01.01.1978
  72. 14 connects
  73. 15 logins
  74. 16 received
  75. 17 sent
  76. 18 adtmode
  77. 19 delay
  78. 20 adtdate    seconds since 01.01.1978
  79. 21 keepalive  0=off 1=on
  80. 22 files received
  81. 23 files sent
  82. 24 onlinetime seconds
  83. 25 usecache   0=off 1=on
  84. 26 max cps current
  85. 27 max cps average
  86. 28 use PASV   0=off 1=on
  87. 29 singlelist 0=off 1=on
  88. 30 dropcps    0 means off
  89. 31 dropsecs
  90. 32 droptries
  91. 33 dropignore
  92. 34 ADT keepdirtree  0=off 1=on
  93. 35 suppressadtlogin 0=off 1=on
  94. 36 showmotd         0=off 1=on
  95. 37 ADT getreadme    0=off 1=on
  96. 38 last ADT-MOTD date
  97. */
  98.